var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Animal2 = /** @class */ (function () {
    function Animal2(theName) {
        this.gender = "boy"; // 比private 宽松一点 可以让子类用
        this.name = theName;
    }
    return Animal2;
}());
// new Animal2("Cat").name // 报错
// new Animal2("Cat").gender // 报错
new Animal2("Cat").hh; // 
var Dog2 = /** @class */ (function (_super) {
    __extends(Dog2, _super);
    function Dog2(childrenName) {
        var _this = _super.call(this, childrenName) || this;
        // this.name // 报错 
        _this.gender = "girl"; // 可以访问 修改 父级 protected修饰的变量
        _this.hh;
        return _this;
    }
    Dog2.prototype.brak = function () {
        console.log('www');
    };
    // 可以增加方法暴露 父级的 protected 的变量
    Dog2.prototype.getGender = function () {
        return this.gender;
    };
    return Dog2;
}(Animal2));
console.log(new Dog2("hsq").getGender());
